package com.googlecode.cannedbeans.generator.core.exceptions;

import com.googlecode.cannedbeans.generator.core.strategies.GenerationStrategy;
import com.googlecode.cannedbeans.generator.model.ConstraintType;

/**
 *
 * @author Kim
 */
public class UnsupportedConstraintException extends Throwable {

    private GenerationStrategy strategy;
    private ConstraintType unsupportedConstraint;

    public UnsupportedConstraintException(final GenerationStrategy strategy, final ConstraintType unsupportedConstraint) {
        this.strategy = strategy;
        this.unsupportedConstraint = unsupportedConstraint;
    }

    @Override
    public String getMessage() {
        return "ConstraintType " + unsupportedConstraint.name() + " is not supported for generation strategy " + strategy.getClass().getCanonicalName();
    }
}
